<?php


namespace paper\exception;

class BaseException extends \Exception
{
    /**
     * @param int $line
     */
    public function setLine(int $line): void
    {
        $this->line = $line;
    }

    /**
     * @param mixed $code
     */
    public function setCode($code): void
    {
        $this->code = $code;
    }

    /**
     * @param mixed $message
     */
    public function setMessage($message): void
    {
        $this->message = $message;
    }

    /**
     * @param string $file
     */
    public function setFile(string $file): void
    {
        $this->file = $file;
    }

    public function setException(\Throwable $throwable)
    {
        $this->setFile($throwable->getFile());
        $this->setCode($throwable->getCode());
        $this->setLine($throwable->getLine());
        $this->setMessage($throwable->getMessage());
    }
}